Skip to content

Include CodeQL scan in the commit checks#608

Merged
stleary merged 3 commits intostleary:masterfrom
artem-smotrakov:setup-codeql-scans
Feb 6, 2022
Merged

Include CodeQL scan in the commit checks#608
stleary merged 3 commits intostleary:masterfrom
artem-smotrakov:setup-codeql-scans

Conversation

@artem-smotrakov
Copy link
Copy Markdown
Contributor

GitHub now offers code scanning that is based on CodeQL (the same engine that is used in LGTM.com). Shortly, that's a static analysis tool that is able to catch various issues including security ones. Once enabled for pull requests, it would help with catching issues earlier.

The scan may be run via GitHub Actions for pull requests. Or, LGTM checks may be added, the instructions are here.

How about enabling the scans for JSON-Java? The proposed update creates a GitHub workflow that runs CodeQL scans for pull requests and the master branch. There results will be available:

  • in the "Security" tab for project maintainers
  • in each pull request (only new alerts or fixed ones)

P.S. The file was generated by GitHub, I just disabled autobuild and added another build command. I can remove all the comments if necessary.

@stleary
Copy link
Copy Markdown
Owner

stleary commented Jun 2, 2021

Interesting, let's see if there are any opinions or concerns about using this.

@artem-smotrakov
Copy link
Copy Markdown
Contributor Author

Interesting, let's see if there are any opinions or concerns about using this.

Looks like no :)

@stleary
Copy link
Copy Markdown
Owner

stleary commented Nov 24, 2021

What problem does this code solve?
Makes the code a little safer by checking for quality issues in a workflow

Risks
Low

Changes to the API?
None

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No

Was any code refactored in this commit?
N/A

Review status
APPROVED

@stleary
Copy link
Copy Markdown
Owner

stleary commented Nov 24, 2021

Starting 3 day comment window

@javadev
Copy link
Copy Markdown
Contributor

javadev commented Feb 3, 2022

🙄

@stleary
Copy link
Copy Markdown
Owner

stleary commented Feb 3, 2022

@javadev Thanks for the reminder. Recently we added fuzz-testing (#641) and I started getting spammed with emails that were difficult to track down and take action on. That made me less enthusiastic about adding tooling that might make check-ins more difficult. If someone has time to clone this project, set up CodeQL, and preview what kind of problems are already in the code, that could help.

@artem-smotrakov
Copy link
Copy Markdown
Contributor Author

@stleary All alerts should be visible in the PR check "Code scanning results / CodeQL"

but looks like the results already expired (the run was done in June 2021). Could you please rerun workflows on this PR? I'll have a look at the alerts.

@stleary
Copy link
Copy Markdown
Owner

stleary commented Feb 6, 2022

@artem-smotrakov Thanks for the reminder. I did not see any problems with the checks.

@stleary stleary changed the title Setup CodeQL scans Include CodeQL scan in the commit checks Feb 6, 2022
@stleary stleary merged commit 7d6b76d into stleary:master Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants